﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>呷饭网</title>
    <link rel="stylesheet" type="text/css" href="./styles/mobile.css" />
    <link href="styles/jquery.ui.all.css" rel="stylesheet" />
    <script type="text/javascript" src="scripts/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="scripts/jquery.bgiframe-2.1.1.js"></script>
    <script type="text/javascript" src="scripts/jquery.ui.core.js"></script>
    <script type="text/javascript" src="scripts/jquery.ui.widget.js"></script>
    <script type="text/javascript" src="scripts/jquery.ui.mouse.js"></script>
    <script type="text/javascript" src="scripts/jquery.ui.button.js"></script>
    <script type="text/javascript" src="scripts/jquery.ui.draggable.js"></script>
    <script type="text/javascript" src="scripts/jquery.ui.position.js"></script>
    <script type="text/javascript" src="scripts/jquery.ui.dialog.js"></script>
    <script type="text/javascript" src="scripts/jquery.ui.datepicker.js"></script>
    <link href="styles/flexy-menu.css" rel="stylesheet" />
    <script type="text/javascript" src="scripts/flexy-menu.js"></script>
    <script type="text/javascript" src="scripts/common.js"></script>

    <script type="text/javascript">
        var PageFlag;
        $(function () {
            $(".flexy-menu").flexymenu({ speed: 100 });
            getUserInfo();
          
            PageFlag = getParameter("PageFlag");
            $('.goback').click(function () {
                if (PageFlag == "1") {
                    window.location.href = "./manager.html";
                }
                else {
                    window.location.href = "./login.html";
                }
            }); 
        }); 

        //获取酒店待烹饪数据
        function getUpdatePWD() {

            var oldpwd = $("#txtOldPassword").val();
            var newpwd = $("#txtPassword").val();
            var newpwd1 = $("#txtPassword1").val();

            if (newpwd != newpwd1) {
                $("#msgtip").text("两次密码不一致,请重新输入");
                $("#txtPassword1").val("");
                $("#txtPassword1").focus();
                return false;
            } 
            var datas = "&oldpwd=" + oldpwd + "&newpwd=" + newpwd;
            var url = "CommonPage.aspx?opration=UpdatePassWord" + datas;
            $.ajax({
                url: url,
                type: "post",
                dataType: 'json',
                success: function (data) {
                    if (data.Success) { 
                        //$("#msgtip").text(data.Msg);
                        // return true;
                        updateTip(data.Msg, true, "URL", data.Url);
                    }
                    else { 
                        $("#msgtip").text(data.Msg);
                        return false;
                    }
                }
            });
        } 
      
    </script>
</head> 
<body>
    <div class="wrapall">
        <table class="topbar">
            <tr>
                <td class="l"><a class="goback">返回</a></td>
                <td class="c" id="H_Name" style="display:none;"></td>
                <td class="c">修改密码</td>
                <td class="r" >
                    <ul class="flexy-menu">
                        <li id="lilist">
                        </li>
                    </ul>
                </td>
            </tr>
        </table> 
        <table class="tbllist tblbtn" id="tbllist" >
            <tr>
                <td>旧密码：</td> <td><input type="password" id="txtOldPassword"/></td>
            </tr>
            <tr>
                <td>新密码：</td> <td><input type="password" id="txtPassword"/></td>
            </tr>
            <tr>
                <td>确认密码：</td> <td><input type="password" id="txtPassword1"/></td>
            </tr>
            <tr>
                <td colspan="2"> 
                    <b id="msgtip" style="color: red"></b> 
                </td>
            </tr>
            <tr>
                <td colspan="2"><a href="#" onclick= "return  getUpdatePWD();">提交</a></td>
            </tr>
        </table> 
    </div> 
      <div id="dialog" title="提示信息" style="text-align:center; vertical-align: middle;">
        <p class="dialogTip"></p>
    </div>
</body>
</html>
